<?php


class Sherpa_Model_Basket extends WSB_Model
{

	/**
	 * @var array
	 */
	protected $_data = array(
		'id' => null,
		'feuserId' => null,
		'sessionId' => null,
		'modified' => null,
		'created' => null
	);

	/**
	 * @param integer $feuserId
	 * @return integer
	 */
	public function saveFeuserId($feuserId)
	{
		$id = intval($this->getId());
		if($id > 0) {
			$data = array(
				'feuserId' => $feuserId,
				'modified' => new Zend_Db_Expr('NOW()')
			);
			return $this->getGateway()->update('sherpa_baskets', $data, 'id=' . $id);
		} else {
			return 0;
		}
	}

}
